import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int [] nums1 = {1,2,3,0,0,0};
        int [] nums2 = {2,5,6};
        int m = 3, n = 3;
        for (int i = 0; i < n; i++) {
            nums1[i + m] = nums2[i];
        }
        Arrays.sort(nums1);
    }
    public static void main1(String[] args) {
        int[] nums = {0,0,1,1,1,2,2,3,3,4};
        int len = nums.length;
        for (int i = 0; i < len - 1; i++) {
            for (int j = i + 1; j < len; j++) {
                if (nums[i] == nums[j]) {
                    for (int k = j; k < len - 1; k++) {
                        nums[k] = nums[k + 1];
                    }
                    j--;
                    len--;
                }
            }
        }
    }
}